﻿<src:AddNewItemWindow x:Class="SiliconStudio.Meet.EjsManager.AddNewCourseDocumentWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:src="clr-namespace:SiliconStudio.Meet.EjsManager"
    Title="Add New Course Document" Height="400" Width="300"
    WindowStyle="ThreeDBorderWindow" WindowStartupLocation="CenterOwner">
    
    <Grid>
        <Rectangle Grid.Column="1" Fill="{StaticResource StagePanelBackground}" StrokeThickness="1" Margin="2"
                       HorizontalAlignment="Stretch" VerticalAlignment="Stretch" RadiusX="4" RadiusY="4" />

        <Label HorizontalAlignment="Left" Margin="0,0,0,0" VerticalAlignment="Top" Width="Auto" Height="Auto" 
                   Content="New Course Document Details:" FontSize="12" Grid.Column="0"/>

        <TextBox TextChanged="_dv_CheckStringInput" Margin="8,51.81,8,0" MaxLength="150" VerticalAlignment="Top" Height="Auto" TextWrapping="NoWrap" x:Name="_tb_Title"/>
        <Label HorizontalAlignment="Left" Margin="8,35.57,0,0" VerticalAlignment="Top" Width="Auto" Height="Auto" Content="Title:" FontSize="11" Padding="0,0,0,0"/>
        <TextBox TextChanged="_dv_CheckStringInput" Height="75" MaxLength="500" TextWrapping="Wrap" Margin="8,99.57,8,0" VerticalAlignment="Top" x:Name="_tb_Description"/>
        <Label Width="Auto" Height="Auto" Content="Description:" FontSize="11" Padding="0,0,0,0" HorizontalAlignment="Left" Margin="8,83.33,0,0" VerticalAlignment="Top"/>
        
        <Label Width="Auto" Height="Auto" Content="Choose File:" FontSize="11" Padding="0,0,0,0" HorizontalAlignment="Left" Margin="8,180,0,0" VerticalAlignment="Top"/>
        <Button HorizontalAlignment="Left" Margin="8,198,0,8" VerticalAlignment="Top" Content="Browse" Click="OnBrowseForFile"/>
        <Label Width="Auto" Height="Auto" Content="" x:Name="_l_CurrentFileName" FontSize="10" Padding="0,0,0,0" HorizontalAlignment="Left" Margin="70,203,0,0" VerticalAlignment="Top"/>
                
        <Label Width="Auto" Height="Auto" Content="Register to Course:" FontSize="11" Padding="0,0,0,0" HorizontalAlignment="Left" Margin="8,226,0,0" VerticalAlignment="Top"/>
        <ComboBox Margin="8,243,8,0" Height="Auto" IsSynchronizedWithCurrentItem="True" HorizontalAlignment="Stretch" VerticalAlignment="Top" 
                      ItemsSource="{Binding Mode=OneWay, Source={StaticResource CompleteCoursesForNewDocumentList}}" DisplayMemberPath="_name"
                        x:Name="_cb_CourseList"/>
        
        <CheckBox Margin="8,280,80,40" Height="Auto" Content="Is Available" x:Name="_cb_IsAvailable" VerticalAlignment="Top" VerticalContentAlignment="Center" HorizontalAlignment="Left"/>
        
        <Label HorizontalAlignment="Left" Margin="3,0,0,30" VerticalAlignment="Bottom" Content="* All Fields must be filled in." FontSize="10" />
        
        <Button HorizontalAlignment="Left" Margin="8,0,0,8" VerticalAlignment="Bottom" Width="Auto"
                    Height="Auto" Content="Upload and Save" Click="OnAddNewItem"/>
        <Button HorizontalAlignment="Right" Margin="0,0,8,8" VerticalAlignment="Bottom" Width="Auto" 
                    Height="Auto" Content="Cancel" Click="OnCancel"/>
    </Grid>
</src:AddNewItemWindow>
